package com.funquer.cms.model;

import javax.persistence.Basic;
import javax.persistence.Entity;
import javax.persistence.Id;

/**
 * Created with IntelliJ IDEA.
 * User: Administrator
 * Date: 13-3-22
 * Time: 下午5:33
 * To change this template use File | Settings | File Templates.
 */
@javax.persistence.Table(name = "addonarticle")
@Entity
public class AddonarticleEntity {
    private String aid;

    @javax.persistence.Column(name = "aid")
    @Id
    public String getAid() {
        return aid;
    }

    public void setAid(String aid) {
        this.aid = aid;
    }

    private String arctype;

    @javax.persistence.Column(name = "arctype")
    @Basic
    public String getArctype() {
        return arctype;
    }

    public void setArctype(String arctype) {
        this.arctype = arctype;
    }

    private String body;

    @javax.persistence.Column(name = "body")
    @Basic
    public String getBody() {
        return body;
    }

    public void setBody(String body) {
        this.body = body;
    }

    private String redirecturl;

    @javax.persistence.Column(name = "redirecturl")
    @Basic
    public String getRedirecturl() {
        return redirecturl;
    }

    public void setRedirecturl(String redirecturl) {
        this.redirecturl = redirecturl;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        AddonarticleEntity that = (AddonarticleEntity) o;

        if (aid != null ? !aid.equals(that.aid) : that.aid != null) return false;
        if (arctype != null ? !arctype.equals(that.arctype) : that.arctype != null) return false;
        if (body != null ? !body.equals(that.body) : that.body != null) return false;
        if (redirecturl != null ? !redirecturl.equals(that.redirecturl) : that.redirecturl != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = aid != null ? aid.hashCode() : 0;
        result = 31 * result + (arctype != null ? arctype.hashCode() : 0);
        result = 31 * result + (body != null ? body.hashCode() : 0);
        result = 31 * result + (redirecturl != null ? redirecturl.hashCode() : 0);
        return result;
    }
}
